
!!calculate the total magnetization in every mc step
subroutine delta_mag(latt,lattm)
use para 
implicit none
integer,intent(in)::latt,lattm

totmx=totmx+dspin(1,latt,lattm)
totmy=totmy+dspin(2,latt,lattm)
totmz=totmz+dspin(3,latt,lattm)

totm2=totmx*totmx+totmy*totmy+totmz*totmz
totm=sqrt(totm2)

end subroutine


!subroutine delta_lamda(unum,us)
!use para
!implicit none
!integer,intent(in)::unum,us

!lamda(unum,us)=lamda(unum,us)+dlamda

!end subroutine









